package com.shycloud.mido.basic.api.feign;

import com.shycloud.mido.basic.api.entity.BasSubject;
import com.shycloud.mido.common.core.constant.SecurityConstants;
import com.shycloud.mido.common.core.constant.ServiceNameConstants;
import com.shycloud.mido.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * BASIC移动端协调服务
 * @author yyy
 */
@FeignClient(value = ServiceNameConstants.BASIC_MOBILE_SERVICE)
public interface BasicMobileService {
	/**
	 * 通过ID查询字典信息
	 *
	 * @param id ID
	 * @return 字典信息
	 */
	@GetMapping("/basic/getOne")
	R getById(@RequestParam("id") Integer id);

	/**
	 * 科目查询接口
	 * @param id
	 * @param id
	 * @return
	 */
	@GetMapping("/subject/subjectById")
	BasSubject subjectById(@RequestParam("id") String id);


	/**
	 * 重写字典表查询
	 * @param type 字典类别
	 * @return
	 */
	@GetMapping("/dictionary/dicMap")
	Map<String, String> dicMap(@RequestParam("type")String type);

	/**
	 * 重写字典表查询
	 * @return
	 */
	@GetMapping("/subject/subjectMap")
	Map<Integer, String> subjectMap();


	/**
	 * 科目查询接口
	 * @param id
	 * @param id
	 * @return
	 */
	@GetMapping("/subject/subjectById")
	BasSubject subjectById(@RequestParam("id") String id,@RequestHeader(SecurityConstants.FROM) String from);

}
